package job.work.domain.system.entity.pojo;


import lombok.ToString;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;
import java.util.Set;


@ToString
public class UserJwt extends User {
    /**
     * 用户ID
     */
    private Long id;

    /**
     * 用户昵称
     */
    private String name;

    /**
     * 用户图片
     */
    private String image;
    /**
     * 用户角色ID
     */
    private Long roleId;
    /**
     * 用户手机号
     */
    private String telephone;

    /**
     * 用户类型
     */

    private String utype;

    /**
     * 用户权限
     */
    private Set<Long> userPermission;

    public UserJwt(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }

    public UserJwt(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
    }



    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getUtype() {
        return utype;
    }

    public void setUtype(String utype) {
        this.utype = utype;
    }

    public Set<Long> getUserPermission() {
        return userPermission;
    }

    public void setUserPermission(Set<Long> userPermission) {
        this.userPermission = userPermission;
    }
}
